package org.example.controller;

import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author limeng
 * @create 2021-06-08 9:50
 */
@RestController
@Slf4j
public class ProductController {

    //private static final Logger log = LoggerFactory.getLogger(ProductController.class);

    @Value("${server.port}")
    private Integer port;

    @GetMapping("/product/test")
    public String test() {
        log.info("商品服务,当前端口号为:{}", port);
        return "商品服务,当前端口号为:" + port;
    }
}
